/* eslint-disable no-undef */

/**
 * tailwind 官网：tailwind 官网：https://tailwindcss.com/docs/installation
 */

const colors = require('tailwindcss/colors');
const emptyColors = Object.keys(colors).map((name) => ({ [name]: {} })); // 清除默认 colors 配置

require('json5/lib/register');
const antTheme = require('./src/style/ant-theme.json5');

module.exports = {
  purge: { content: ['./src/**/*.{ts,tsx}'] },
  content: ['./src/**/*.{ts,tsx}'],
  darkMode: false,
  theme: {
    colors: {
      ...emptyColors,
      white: '#fff',
      transparent: 'transparent',
      current: 'currentColor',
      primary: antTheme['primary-color'], // #ee4d2d
      link: antTheme['link-color'], // #2673dd
      gray: {
        primary: antTheme['text-color'], // 0.85
        secondary: antTheme['text-color-secondary'], // 0.65
        third: 'rgba(0,0,0,0.45)',
        fourth: 'rgba(0,0,0,0.15)'
      },
      disable: 'rgba(0, 0, 0, 0.25)',
      success: antTheme['success-color'], // #55cc77
      error: antTheme['error-color'], // #ff4d4f
      warning: antTheme['warning-color'] // #eda500
    }
  },
  plugins: [],
  corePlugins: {
    preflight: false
  }
};
